package com.baseframe.sms.sign;


import lombok.Getter;

@Getter
public enum SmsType {
    UNKNOWN(0,"未知"),

    UNI_SMS(1,"uni短信平台"),

    TENCENT(2,"腾讯云短信平台")


    ;

    SmsType(int code, String name) {
        this.code = code;
        this.name = name;

    }

    private final int code;
    private final String name;


    public static SmsType getSmsType(int code){
        for (SmsType value : values()) {
            if (value.getCode()==code){
                return value;
            }
        }

        return SmsType.UNKNOWN;
    }



}
